<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$admin_title}</title>
<include file="./core/Modules/Center/Tpl/Public/js_css_header.html" />
</head>
<body>
	<include file="./core/Modules/Center/Tpl/Public/header.html" />
	<table width="100%" height="100%" class="manage_block">
	  <tbody>
	    <tr>
	      <td class="manage_left" valign="top">
	      	<include file="./core/Modules/Center/Tpl/Public/system_manage_left.html" />
	      </td>
	      <td valign="top">
	        <div class="cont_wrap">
				<div class="position">当前位置:&nbsp;<a href="__APP__/center/frame/index/">首页</a>&nbsp;&gt;&nbsp;<a href="__APP__/admin/DynamicModuleManage/" target="_self">自定义模块管理</a>&nbsp;&gt;&nbsp;<a href="__APP__/admin/DynamicModuleFieldManage/?dynamic_module_id={$dynamic_module_id}">[<strong style="color:green;">{$dynamic_module.module_name}</strong>]&nbsp;模块字段管理</a>&nbsp;&gt;&nbsp;<if condition="$obj != null">修改操作<else />新增操作</if></div>
				<form name="formSubmit" action="__APP__/center/DynamicModuleFieldManage/<if condition="$obj != null">update/<else />add/</if>" method="post" enctype="multipart/form-data">
					<if condition="$obj != null"><input type="hidden" name="id" value="{$obj.dynamic_module_field_id}" /></if>
					<input type="hidden" name="dynamic_module_id" value="{$dynamic_module_id}"/>
					<table width="100%" cellpadding="0" cellspacing="0" class="line">
						<tr height="20">
							<td align="center" width="18%" class="tabl_line_bg">字段类型</td>
							<td align="left">
								<select name="form_type" class="select">
						            <option value="">请选择字段类型</option>
						            <option value="<php>echo FormType::$INPUT;</php>" <if condition="$obj.form_type eq FormType::$INPUT"> selected="selected"</if>><php>echo FormType::$INPUT;</php></option>
						            <option value="<php>echo FormType::$TEXTAREA;</php>" <if condition="$obj.form_type eq FormType::$TEXTAREA"> selected="selected"</if>><php>echo FormType::$TEXTAREA;</php></option>
						            <option value="<php>echo FormType::$EDITOR;</php>" <if condition="$obj.form_type eq FormType::$EDITOR"> selected="selected"</if>><php>echo FormType::$EDITOR;</php></option>
						            <option value="<php>echo FormType::$NUMBER;</php>" <if condition="$obj.form_type eq FormType::$NUMBER"> selected="selected"</if>><php>echo FormType::$NUMBER;</php></option>
						            <option value="<php>echo FormType::$SELECT;</php>" <if condition="$obj.form_type eq FormType::$SELECT"> selected="selected"</if>><php>echo FormType::$SELECT;</php></option>
						            <option value="<php>echo FormType::$IMAGE;</php>" <if condition="$obj.form_type eq FormType::$IMAGE"> selected="selected"</if>><php>echo FormType::$IMAGE;</php></option>
						            <option value="<php>echo FormType::$MULTI_IMAGE;</php>" <if condition="$obj.form_type eq FormType::$MULTI_IMAGE"> selected="selected"</if>><php>echo FormType::$MULTI_IMAGE;</php></option>
						            <option value="<php>echo FormType::$FILE;</php>" <if condition="$obj.form_type eq FormType::$FILE"> selected="selected"</if>><php>echo FormType::$FILE;</php></option>
						            <option value="<php>echo FormType::$MULTI_FILE;</php>" <if condition="$obj.form_type eq FormType::$MULTI_FILE"> selected="selected"</if>><php>echo FormType::$MULTI_FILE;</php></option>
						        </select>
						        <span id="length" <if condition="$obj.form_type eq FormType::$NUMBER || $obj.form_type eq FormType::$EDITOR || $obj.form_type eq FormType::$MULTI_IMAGE || $obj.form_type eq FormType::$MULTI_FILE">style="display: none;"</if>>&nbsp;文本框长度&nbsp;<input type="text" name="varchar_len" size="80" value="<if condition='$obj eq null'>50<else/>{$obj.varchar_len}</if>" class="text" style="width: 50px;"/>&nbsp;字符（255字符以内）</span>
							</td>
						</tr>
						<tr height="20">
							<td align="center" class="tabl_line_bg">字段名</td>
							<td align="left">
								<input type="text" name="field_name" size="80" value="{$obj.field_name}" class="text" style="width: 200px;"/>
							</td>
						</tr>
						<tr height="20">
							<td align="center" class="tabl_line_bg">字段描述</td>
							<td align="left">
								<input type="text" name="field_desc" size="80" value="{$obj.field_desc}" class="text"/>
							</td>
						</tr>
						<tr height="20">
							<td align="center" class="tabl_line_bg">字段提示</td>
							<td align="left">
								<input type="text" name="field_tip" size="80" value="{$obj.field_tip}" class="text"/>
							</td>
						</tr>
						<tr id="select_val" height="20" <if condition="$obj.form_type neq FormType::$SELECT">style="display: none;"</if>>
							<td align="center" class="tabl_line_bg">选项列表</td>
							<td align="left">
								<input type="radio" name="select_type" value="<php>echo SelectType::$RADIO;</php>"  <if condition="$obj.select_type neq SelectType::$CHECKBOX && $obj.select_type neq SelectType::$SELECT">checked="checked"</if>/>&nbsp;<php>echo SelectType::$RADIO;</php>
					            <input type="radio" name="select_type" value="<php>echo SelectType::$CHECKBOX;</php>" <if condition="$obj.select_type eq SelectType::$CHECKBOX">checked="checked"</if>/>&nbsp;<php>echo SelectType::$CHECKBOX;</php>
					            <input type="radio" name="select_type" value="<php>echo SelectType::$SELECT;</php>" <if condition="$obj.select_type eq SelectType::$SELECT">checked="checked"</if>/>&nbsp;<php>echo SelectType::$SELECT;</php><br/>
								<textarea name="select_val" style="width: 492px;height:86px;" class="textarea"><if condition="$obj.select_val eq null">选项值1,选项值2</if>{$obj.select_val}</textarea>
								<br/><span style="color:gray;">提示：每个选项值以逗号相隔</span>
							</td>
						</tr>
						<tr height="20">
							<td align="center" class="tabl_line_bg">数据校验正则</td>
							<td align="left">
								<input type="text" id="validate_reg_cont" name="validate_reg_cont" size="80" value="{$obj.validate_reg_cont}" class="text" style="width: 200px;"/>
								<select name="pattern_select" class="select" onchange="javascript:$('#validate_reg_cont').val(this.value)">
						            <option value="">常用正则</option>
						            <option value="/^[0-9.-]+$/">数字</option>
						            <option value="/^[0-9-]+$/">整数</option>
						            <option value="/^[a-z]+$/i">字母</option>
						            <option value="/^[0-9a-z]+$/i">数字+字母</option>
						            <option value="/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/">E-mail</option>
						            <option value="/^[0-9]{5,20}$/">QQ</option>
						            <option value="/^http:\/\//">超级链接</option>
						            <option value="/^(1)[0-9]{10}$/">手机号码</option>
						            <option value="/^[0-9-]{6,13}$/">电话号码</option>
						          </select>
							</td>
						</tr>
						<tr height="20">
							<td align="center" class="tabl_line_bg">数据校验未通过的提示信息</td>
							<td align="left">
								<input type="text" name="error_tip" size="80" value="{$obj.error_tip}" class="text"/>
							</td>
						</tr>
						<tr height="20">
							<td align="left" colspan="2">
								<if condition="$referUrl != '' && $referUrl != null"><a class="button" href="javascript:redirectURL('{$referUrl}');">返回</a></if>
								&nbsp;<a id="submit_btn" class="button" href="javascript:;" onclick="doSubmitForm(this,'__APP__')">提交</a>
							</td>
						</tr>
					</table>
				</form>
			</div>
	      </td>
	    </tr>
	  </tbody>
	</table>
</body>
</html>
